﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Cataloger
{
    public partial class FrmPrzeniesNosnik : Form
    {
        public FrmPrzeniesNosnik()
        {
            InitializeComponent();
            comboBox1.Items.AddRange(Katalog.WczytaneKatalogi.ToArray());
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }
        public Katalog katal
        {
            get { return (Katalog)comboBox1.SelectedItem; }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (comboBox1.SelectedItem != null)
            {
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
            else
                MessageBox.Show("Nie wybrałeś hatalogu");
        }
    }
}
